# Contributor: Michael Pirogov <vbnet.ru@gmail.com>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=libaio
pkgver=0.3.112
pkgrel=2
pkgdesc="Asynchronous input/output library"
url="https://pagure.io/libaio"
arch="all"
license="LGPL-2.1-or-later"
checkdepends="bash"
subpackages="$pkgname-dev $pkgname-doc"
source="https://releases.pagure.org/libaio/libaio-$pkgver.tar.gz
	libaio-optional-werror.patch
	libaio-cppflags.patch
	libaio-errno.patch
	test.patch
	test-poll.patch
	"

build() {
	make
}

check() {
	make partcheck
}

package() {
	DESTDIR="$pkgdir" make install
	cd man
	find ./ -name "*.3" -exec install -Dm 644 {} "$pkgdir"/usr/share/man/man3/{} \;
}

sha512sums="
5f984529c9f747a6c82f1e4457fc0832bb1fc299ae6e700f2ac5a8ea7b9bfc6ea1e75809728cc115a020cff6685ed1f4e38c6aeacc1ea98dfccce04dd19dafaa  libaio-0.3.112.tar.gz
9b04df1f92b245c3012d161a96bc54d3bcc07d8a1049d7e5acfae50fba9bba94cbdbc220d75d186d6bf2333d58b093b9cf17bd7cd594cfdbfb6682a63daf19fd  libaio-optional-werror.patch
c9ad6ff35ba12f33e308059d89592281768cef7091213b4702b64af2d194462864ec660dea327f8b718e5c723ec9ba6170b591461e2b140ba94f6838cddb8d7c  libaio-cppflags.patch
2bf5224f5c5714786cb9ed28d9ae7c1721ad21a498d7e76d0cd1443435f7cd424bd6d80baa961a07f38f20359711b3270cd5913890a47b683e035dfe00f66054  libaio-errno.patch
b2bb73b7fe2ae083af8d7a8a6e5fe34830bff007b5dcdb565a440d81178f85862ac5b45b5e9ea061a5624eb4841ef013ed5c0d725e23f329721d4699b3d2cf56  test.patch
b8c0fc6eb5c624a58c0110893af44cb1a3b3b047a6498705655854e3e1172fc587520cbe945738689c69d89b39c11c614e039e4850e0bb019e6a78fa1b5a9a85  test-poll.patch
"
